C=0.01;
U0=100000;
R=0.001;
L=0.001;

Ls=zeros(100);
maxB=zeros(100);
Ls(1)=L;
[aa,maxB(1)]=magnet4(0,L,C,R,U0,1);
for i=2:10
    Ls(i)=Ls(i-1)/2;
    [aa,maxB(i)]=magnet4(0,Ls(i),C,R,U0,1);
end
plot(Ls,maxB);

%the less the L is, the bigger maxB we can get.
%----------------------------------------------

% C=0.01;
% U0=100000;
% R=0.001;
% L=0.001;
% 
% Rs=zeros(100);
% maxB=zeros(100);
% Rs(1)=R;
% [aa,maxB(1)]=magnet4(0,L,C,R,U0,1);
% for i=2:10
%     Rs(i)=Rs(i-1)/2;
%     [aa,maxB(i)]=magnet4(0,L,C,Rs(i),U0,1);
% end
% plot(Rs,maxB);


%the less the R is, the bigger maxB we can get.
%----------------------------------------------

% C=0.001;
% U0=1000000;
% R=0.001;
% L=0.001;
% 
% Cs=zeros(100);
% maxB=zeros(100);
% Cs(1)=C;
% [aa,maxB(1)]=magnet4(0,L,C,R,U0,1);
% for i=2:10
%     Cs(i)=Cs(i-1)*2;
%     [aa,maxB(i)]=magnet4(0,L,Cs(i),R,U0,1);
% end
% plot(Cs,maxB);

%the bigger the C is, the bigger maxB we can get.
%----------------------------------------------